package com.zenchn.model;

import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;

public class TMiCustomerUpgradeExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    public TMiCustomerUpgradeExample() {
        oredCriteria = new ArrayList<>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andUpgradeIdIsNull() {
            addCriterion("upgrade_id is null");
            return (Criteria) this;
        }

        public Criteria andUpgradeIdIsNotNull() {
            addCriterion("upgrade_id is not null");
            return (Criteria) this;
        }

        public Criteria andUpgradeIdEqualTo(String value) {
            addCriterion("upgrade_id =", value, "upgradeId");
            return (Criteria) this;
        }

        public Criteria andUpgradeIdNotEqualTo(String value) {
            addCriterion("upgrade_id <>", value, "upgradeId");
            return (Criteria) this;
        }

        public Criteria andUpgradeIdGreaterThan(String value) {
            addCriterion("upgrade_id >", value, "upgradeId");
            return (Criteria) this;
        }

        public Criteria andUpgradeIdGreaterThanOrEqualTo(String value) {
            addCriterion("upgrade_id >=", value, "upgradeId");
            return (Criteria) this;
        }

        public Criteria andUpgradeIdLessThan(String value) {
            addCriterion("upgrade_id <", value, "upgradeId");
            return (Criteria) this;
        }

        public Criteria andUpgradeIdLessThanOrEqualTo(String value) {
            addCriterion("upgrade_id <=", value, "upgradeId");
            return (Criteria) this;
        }

        public Criteria andUpgradeIdLike(String value) {
            addCriterion("upgrade_id like", value, "upgradeId");
            return (Criteria) this;
        }

        public Criteria andUpgradeIdNotLike(String value) {
            addCriterion("upgrade_id not like", value, "upgradeId");
            return (Criteria) this;
        }

        public Criteria andUpgradeIdIn(List<String> values) {
            addCriterion("upgrade_id in", values, "upgradeId");
            return (Criteria) this;
        }

        public Criteria andUpgradeIdNotIn(List<String> values) {
            addCriterion("upgrade_id not in", values, "upgradeId");
            return (Criteria) this;
        }

        public Criteria andUpgradeIdBetween(String value1, String value2) {
            addCriterion("upgrade_id between", value1, value2, "upgradeId");
            return (Criteria) this;
        }

        public Criteria andUpgradeIdNotBetween(String value1, String value2) {
            addCriterion("upgrade_id not between", value1, value2, "upgradeId");
            return (Criteria) this;
        }

        public Criteria andCustomerIdIsNull() {
            addCriterion("customer_id is null");
            return (Criteria) this;
        }

        public Criteria andCustomerIdIsNotNull() {
            addCriterion("customer_id is not null");
            return (Criteria) this;
        }

        public Criteria andCustomerIdEqualTo(String value) {
            addCriterion("customer_id =", value, "customerId");
            return (Criteria) this;
        }

        public Criteria andCustomerIdNotEqualTo(String value) {
            addCriterion("customer_id <>", value, "customerId");
            return (Criteria) this;
        }

        public Criteria andCustomerIdGreaterThan(String value) {
            addCriterion("customer_id >", value, "customerId");
            return (Criteria) this;
        }

        public Criteria andCustomerIdGreaterThanOrEqualTo(String value) {
            addCriterion("customer_id >=", value, "customerId");
            return (Criteria) this;
        }

        public Criteria andCustomerIdLessThan(String value) {
            addCriterion("customer_id <", value, "customerId");
            return (Criteria) this;
        }

        public Criteria andCustomerIdLessThanOrEqualTo(String value) {
            addCriterion("customer_id <=", value, "customerId");
            return (Criteria) this;
        }

        public Criteria andCustomerIdLike(String value) {
            addCriterion("customer_id like", value, "customerId");
            return (Criteria) this;
        }

        public Criteria andCustomerIdNotLike(String value) {
            addCriterion("customer_id not like", value, "customerId");
            return (Criteria) this;
        }

        public Criteria andCustomerIdIn(List<String> values) {
            addCriterion("customer_id in", values, "customerId");
            return (Criteria) this;
        }

        public Criteria andCustomerIdNotIn(List<String> values) {
            addCriterion("customer_id not in", values, "customerId");
            return (Criteria) this;
        }

        public Criteria andCustomerIdBetween(String value1, String value2) {
            addCriterion("customer_id between", value1, value2, "customerId");
            return (Criteria) this;
        }

        public Criteria andCustomerIdNotBetween(String value1, String value2) {
            addCriterion("customer_id not between", value1, value2, "customerId");
            return (Criteria) this;
        }

        public Criteria andBeforeLevelIsNull() {
            addCriterion("before_level is null");
            return (Criteria) this;
        }

        public Criteria andBeforeLevelIsNotNull() {
            addCriterion("before_level is not null");
            return (Criteria) this;
        }

        public Criteria andBeforeLevelEqualTo(Integer value) {
            addCriterion("before_level =", value, "beforeLevel");
            return (Criteria) this;
        }

        public Criteria andBeforeLevelNotEqualTo(Integer value) {
            addCriterion("before_level <>", value, "beforeLevel");
            return (Criteria) this;
        }

        public Criteria andBeforeLevelGreaterThan(Integer value) {
            addCriterion("before_level >", value, "beforeLevel");
            return (Criteria) this;
        }

        public Criteria andBeforeLevelGreaterThanOrEqualTo(Integer value) {
            addCriterion("before_level >=", value, "beforeLevel");
            return (Criteria) this;
        }

        public Criteria andBeforeLevelLessThan(Integer value) {
            addCriterion("before_level <", value, "beforeLevel");
            return (Criteria) this;
        }

        public Criteria andBeforeLevelLessThanOrEqualTo(Integer value) {
            addCriterion("before_level <=", value, "beforeLevel");
            return (Criteria) this;
        }

        public Criteria andBeforeLevelIn(List<Integer> values) {
            addCriterion("before_level in", values, "beforeLevel");
            return (Criteria) this;
        }

        public Criteria andBeforeLevelNotIn(List<Integer> values) {
            addCriterion("before_level not in", values, "beforeLevel");
            return (Criteria) this;
        }

        public Criteria andBeforeLevelBetween(Integer value1, Integer value2) {
            addCriterion("before_level between", value1, value2, "beforeLevel");
            return (Criteria) this;
        }

        public Criteria andBeforeLevelNotBetween(Integer value1, Integer value2) {
            addCriterion("before_level not between", value1, value2, "beforeLevel");
            return (Criteria) this;
        }

        public Criteria andUpgradeLevelIsNull() {
            addCriterion("upgrade_level is null");
            return (Criteria) this;
        }

        public Criteria andUpgradeLevelIsNotNull() {
            addCriterion("upgrade_level is not null");
            return (Criteria) this;
        }

        public Criteria andUpgradeLevelEqualTo(Integer value) {
            addCriterion("upgrade_level =", value, "upgradeLevel");
            return (Criteria) this;
        }

        public Criteria andUpgradeLevelNotEqualTo(Integer value) {
            addCriterion("upgrade_level <>", value, "upgradeLevel");
            return (Criteria) this;
        }

        public Criteria andUpgradeLevelGreaterThan(Integer value) {
            addCriterion("upgrade_level >", value, "upgradeLevel");
            return (Criteria) this;
        }

        public Criteria andUpgradeLevelGreaterThanOrEqualTo(Integer value) {
            addCriterion("upgrade_level >=", value, "upgradeLevel");
            return (Criteria) this;
        }

        public Criteria andUpgradeLevelLessThan(Integer value) {
            addCriterion("upgrade_level <", value, "upgradeLevel");
            return (Criteria) this;
        }

        public Criteria andUpgradeLevelLessThanOrEqualTo(Integer value) {
            addCriterion("upgrade_level <=", value, "upgradeLevel");
            return (Criteria) this;
        }

        public Criteria andUpgradeLevelIn(List<Integer> values) {
            addCriterion("upgrade_level in", values, "upgradeLevel");
            return (Criteria) this;
        }

        public Criteria andUpgradeLevelNotIn(List<Integer> values) {
            addCriterion("upgrade_level not in", values, "upgradeLevel");
            return (Criteria) this;
        }

        public Criteria andUpgradeLevelBetween(Integer value1, Integer value2) {
            addCriterion("upgrade_level between", value1, value2, "upgradeLevel");
            return (Criteria) this;
        }

        public Criteria andUpgradeLevelNotBetween(Integer value1, Integer value2) {
            addCriterion("upgrade_level not between", value1, value2, "upgradeLevel");
            return (Criteria) this;
        }

        public Criteria andCreatorIsNull() {
            addCriterion("creator is null");
            return (Criteria) this;
        }

        public Criteria andCreatorIsNotNull() {
            addCriterion("creator is not null");
            return (Criteria) this;
        }

        public Criteria andCreatorEqualTo(String value) {
            addCriterion("creator =", value, "creator");
            return (Criteria) this;
        }

        public Criteria andCreatorNotEqualTo(String value) {
            addCriterion("creator <>", value, "creator");
            return (Criteria) this;
        }

        public Criteria andCreatorGreaterThan(String value) {
            addCriterion("creator >", value, "creator");
            return (Criteria) this;
        }

        public Criteria andCreatorGreaterThanOrEqualTo(String value) {
            addCriterion("creator >=", value, "creator");
            return (Criteria) this;
        }

        public Criteria andCreatorLessThan(String value) {
            addCriterion("creator <", value, "creator");
            return (Criteria) this;
        }

        public Criteria andCreatorLessThanOrEqualTo(String value) {
            addCriterion("creator <=", value, "creator");
            return (Criteria) this;
        }

        public Criteria andCreatorLike(String value) {
            addCriterion("creator like", value, "creator");
            return (Criteria) this;
        }

        public Criteria andCreatorNotLike(String value) {
            addCriterion("creator not like", value, "creator");
            return (Criteria) this;
        }

        public Criteria andCreatorIn(List<String> values) {
            addCriterion("creator in", values, "creator");
            return (Criteria) this;
        }

        public Criteria andCreatorNotIn(List<String> values) {
            addCriterion("creator not in", values, "creator");
            return (Criteria) this;
        }

        public Criteria andCreatorBetween(String value1, String value2) {
            addCriterion("creator between", value1, value2, "creator");
            return (Criteria) this;
        }

        public Criteria andCreatorNotBetween(String value1, String value2) {
            addCriterion("creator not between", value1, value2, "creator");
            return (Criteria) this;
        }

        public Criteria andUpgradeTypeIsNull() {
            addCriterion("upgrade_type is null");
            return (Criteria) this;
        }

        public Criteria andUpgradeTypeIsNotNull() {
            addCriterion("upgrade_type is not null");
            return (Criteria) this;
        }

        public Criteria andUpgradeTypeEqualTo(String value) {
            addCriterion("upgrade_type =", value, "upgradeType");
            return (Criteria) this;
        }

        public Criteria andUpgradeTypeNotEqualTo(String value) {
            addCriterion("upgrade_type <>", value, "upgradeType");
            return (Criteria) this;
        }

        public Criteria andUpgradeTypeGreaterThan(String value) {
            addCriterion("upgrade_type >", value, "upgradeType");
            return (Criteria) this;
        }

        public Criteria andUpgradeTypeGreaterThanOrEqualTo(String value) {
            addCriterion("upgrade_type >=", value, "upgradeType");
            return (Criteria) this;
        }

        public Criteria andUpgradeTypeLessThan(String value) {
            addCriterion("upgrade_type <", value, "upgradeType");
            return (Criteria) this;
        }

        public Criteria andUpgradeTypeLessThanOrEqualTo(String value) {
            addCriterion("upgrade_type <=", value, "upgradeType");
            return (Criteria) this;
        }

        public Criteria andUpgradeTypeLike(String value) {
            addCriterion("upgrade_type like", value, "upgradeType");
            return (Criteria) this;
        }

        public Criteria andUpgradeTypeNotLike(String value) {
            addCriterion("upgrade_type not like", value, "upgradeType");
            return (Criteria) this;
        }

        public Criteria andUpgradeTypeIn(List<String> values) {
            addCriterion("upgrade_type in", values, "upgradeType");
            return (Criteria) this;
        }

        public Criteria andUpgradeTypeNotIn(List<String> values) {
            addCriterion("upgrade_type not in", values, "upgradeType");
            return (Criteria) this;
        }

        public Criteria andUpgradeTypeBetween(String value1, String value2) {
            addCriterion("upgrade_type between", value1, value2, "upgradeType");
            return (Criteria) this;
        }

        public Criteria andUpgradeTypeNotBetween(String value1, String value2) {
            addCriterion("upgrade_type not between", value1, value2, "upgradeType");
            return (Criteria) this;
        }

        public Criteria andCreateTimeIsNull() {
            addCriterion("create_time is null");
            return (Criteria) this;
        }

        public Criteria andCreateTimeIsNotNull() {
            addCriterion("create_time is not null");
            return (Criteria) this;
        }

        public Criteria andCreateTimeEqualTo(LocalDateTime value) {
            addCriterion("create_time =", value, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeNotEqualTo(LocalDateTime value) {
            addCriterion("create_time <>", value, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeGreaterThan(LocalDateTime value) {
            addCriterion("create_time >", value, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeGreaterThanOrEqualTo(LocalDateTime value) {
            addCriterion("create_time >=", value, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeLessThan(LocalDateTime value) {
            addCriterion("create_time <", value, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeLessThanOrEqualTo(LocalDateTime value) {
            addCriterion("create_time <=", value, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeIn(List<LocalDateTime> values) {
            addCriterion("create_time in", values, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeNotIn(List<LocalDateTime> values) {
            addCriterion("create_time not in", values, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeBetween(LocalDateTime value1, LocalDateTime value2) {
            addCriterion("create_time between", value1, value2, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeNotBetween(LocalDateTime value1, LocalDateTime value2) {
            addCriterion("create_time not between", value1, value2, "createTime");
            return (Criteria) this;
        }

        public Criteria andIsEnableIsNull() {
            addCriterion("is_enable is null");
            return (Criteria) this;
        }

        public Criteria andIsEnableIsNotNull() {
            addCriterion("is_enable is not null");
            return (Criteria) this;
        }

        public Criteria andIsEnableEqualTo(String value) {
            addCriterion("is_enable =", value, "isEnable");
            return (Criteria) this;
        }

        public Criteria andIsEnableNotEqualTo(String value) {
            addCriterion("is_enable <>", value, "isEnable");
            return (Criteria) this;
        }

        public Criteria andIsEnableGreaterThan(String value) {
            addCriterion("is_enable >", value, "isEnable");
            return (Criteria) this;
        }

        public Criteria andIsEnableGreaterThanOrEqualTo(String value) {
            addCriterion("is_enable >=", value, "isEnable");
            return (Criteria) this;
        }

        public Criteria andIsEnableLessThan(String value) {
            addCriterion("is_enable <", value, "isEnable");
            return (Criteria) this;
        }

        public Criteria andIsEnableLessThanOrEqualTo(String value) {
            addCriterion("is_enable <=", value, "isEnable");
            return (Criteria) this;
        }

        public Criteria andIsEnableLike(String value) {
            addCriterion("is_enable like", value, "isEnable");
            return (Criteria) this;
        }

        public Criteria andIsEnableNotLike(String value) {
            addCriterion("is_enable not like", value, "isEnable");
            return (Criteria) this;
        }

        public Criteria andIsEnableIn(List<String> values) {
            addCriterion("is_enable in", values, "isEnable");
            return (Criteria) this;
        }

        public Criteria andIsEnableNotIn(List<String> values) {
            addCriterion("is_enable not in", values, "isEnable");
            return (Criteria) this;
        }

        public Criteria andIsEnableBetween(String value1, String value2) {
            addCriterion("is_enable between", value1, value2, "isEnable");
            return (Criteria) this;
        }

        public Criteria andIsEnableNotBetween(String value1, String value2) {
            addCriterion("is_enable not between", value1, value2, "isEnable");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {
        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}